package com.jing.system.model;

import java.io.Serializable;

/**
 * 分页查询条件的实体类
 * @author jing.yue
 * @version 1.0
 * @since 2012-02-13
 */
public class Page implements Serializable {

	private static final long serialVersionUID = -4495987129630008126L;

	private String stringtime;

	private Integer page;

	private Integer size;

	private Integer firstPage;

	public String getStringtime() {
		return stringtime;
	}

	public void setStringtime(String stringtime) {
		this.stringtime = stringtime;
	}

	public Integer getPage() {
		return page;
	}

	public void setPage(Integer page) {
		this.page = page;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

	public Integer getFirstPage() {
		if(firstPage != null) {
			return firstPage;
		}
		else if(firstPage == null && page != null && size != null) {
			return (page - 1) * size;
		}
		return firstPage;
	}

	public void setFirstPage(Integer firstPage) {
		if(firstPage != null) {
			this.firstPage = firstPage;
		}
		else if(firstPage == null && page != null && size != null) {
			this.firstPage = (page - 1) * size;
		}
	}

}